using UniversalAdmin.Application.DTOs;
using UniversalAdmin.Shared.Enums;

namespace UniversalAdmin.Application.Services;

public interface IArticleService
{
    Task<PagedResultDto<ArticleDto>> GetArticlesAsync(int page = 1, int pageSize = 10, ArticleStatus? status = null, Guid? categoryId = null, string? keyword = null);
    Task<ArticleDto?> GetArticleByIdAsync(Guid id);
    Task<ArticleDto> CreateArticleAsync(CreateArticleDto dto, Guid authorId);
    Task<ArticleDto?> UpdateArticleAsync(Guid id, UpdateArticleDto dto);
    Task<bool> DeleteArticleAsync(Guid id);
    Task<bool> UpdateArticleStatusAsync(Guid id, ArticleStatus status);
    Task<bool> IncrementViewCountAsync(Guid id);
    Task<IEnumerable<ArticleDto>> GetArticlesByCategoryAsync(Guid categoryId, int page = 1, int pageSize = 10);
    Task<IEnumerable<ArticleDto>> GetArticlesByAuthorAsync(Guid authorId, int page = 1, int pageSize = 10);
}

public interface IArticleCategoryService
{
    Task<IEnumerable<ArticleCategoryDto>> GetAllCategoriesAsync();
    Task<IEnumerable<ArticleCategoryDto>> GetCategoryTreeAsync();
    Task<ArticleCategoryDto?> GetCategoryByIdAsync(Guid id);
    Task<ArticleCategoryDto> CreateCategoryAsync(CreateArticleCategoryDto dto);
    Task<ArticleCategoryDto?> UpdateCategoryAsync(Guid id, UpdateArticleCategoryDto dto);
    Task<bool> DeleteCategoryAsync(Guid id);
} 